<?php

namespace App\Http\Model;

use Illuminate\Database\Eloquent\Model;

class Comment extends Model
{
    protected $table='comment';
    protected $guarded=[];
    public function commentImage(){
        return $this->hasMany('App\Http\Model\CommentImage','comment_id');
    }
    public function ordersInfo(){
        return $this->belongsTo('App\Http\Model\OrdersInfo','orders_info_id');
    }
    public function user(){
        return $this->belongsTo('App\Http\Model\User','user_id');
    }
    public function goods(){
        return $this->belongsTo('App\Http\Model\Goods','goods_id')->where("status", 1);
    }
}
